package org.pybaldaj.chat;

import java.util.Date;

import pybaldaj.client.logic.Player;
import pybaldaj.client.logic.AppClient;
/**
 * Class describing single message.
 * @author akademi4eg
 *
 */
class ChatMessage {

	/**
	 * Creates system user message.
	 * @param message
	 */
	public ChatMessage (String message)
	{
		text = message;
		author = AppClient.getSystemUser();
		date = new Date();
	}
	
	/**
	 * Creates user message.
	 * @param message
	 * @param pl message sender
	 */
	public ChatMessage (String message, Player pl)
	{
		text = message;
		author = pl;
		date = new Date();
	}
	
	public String getText ()
	{
		return text;
	}
	
	public Player getAuthor ()
	{
		return author;
	}
	
	public Date getDate ()
	{
		return date;
	}
	
	private String text;
	private Player author;
	private Date date;
}
